package com.quantdo.client;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;

import com.quantdo.demo.IndexApplicationActionBarAdvisor;

public class ApplicationActionBarAdvisor extends ActionBarAdvisor {

	private IndexApplicationActionBarAdvisor actionBarAdvisor;
	
    public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
        super(configurer);
        actionBarAdvisor = new IndexApplicationActionBarAdvisor();
        System.out.printf("class:%s, function:%s() enter \n", ApplicationActionBarAdvisor.class, "ApplicationActionBarAdvisor");
    }

    protected void makeActions(IWorkbenchWindow window) {
    	System.out.printf("class:%s, function:%s() enter \n", ApplicationActionBarAdvisor.class, "makeActions");
    	actionBarAdvisor.makeActions(this, window);
    }

    protected void fillMenuBar(IMenuManager menuBar) {
    	System.out.printf("class:%s, function:%s() enter \n", ApplicationActionBarAdvisor.class, "fillMenuBar");
    	actionBarAdvisor.fillMenuBar(this, menuBar);
    }
    
    public void register(IAction action) {
    	super.register(action);
    }

	@Override
	protected void fillCoolBar(ICoolBarManager coolBar) {
		super.fillCoolBar(coolBar);
		actionBarAdvisor.fillCoolBar(this, coolBar);
	}
    
}
